package edu.nf.service.impl;

import edu.nf.beans.annotations.Component;
import edu.nf.beans.annotations.Inject;
import edu.nf.dao.FindAllEmpDao;
import edu.nf.exception.QueryException;
import edu.nf.service.FindAllEmpService;


import java.util.List;
import java.util.Map;

@Component("findEmpListService")
public class FindEmpListServiceImpl implements FindAllEmpService {

    @Inject(beanName = "findEmp")
    private FindAllEmpDao dao;


    @Override
    public List<Map<String, Object>> findEmpList() {
        List<Map<String, Object>> list =dao.findAllEmp();
        if(list == null){
            throw new QueryException("find EmpList fail!");
        }
        return list;
    }
}
